<!DOCTYPE html>
<html lang="en">
<head th:insert="/admin/common/head::css"></head>
<body>
<div th:insert="/admin/common/header::header" ></div>
<!--  main  -->
<div class="container-fluid">
    <div class="row-fluid">
        <div th:insert="/admin/common/side::side" ></div>
        <!-- content -->
        <div class="block">
            <div class="block-content collapse in">
                <div class="span12">
                    <span th:if="${msg!=null}"> [[ ${msg} ]] </span>
                    <form class="form-horizontal" method="post" th:action="@{/admin/type/update}">
                        <fieldset>
                            <legend>类别修改</legend>

                            <div class="control-group" th:if="${type != null}">
                                <label class="control-label">类别id</label>
                                <div class="controls">
                                    <input readonly="readonly" required type="text" class="input-xlarge datepicker" id="id" name="id" th:value="${type!=null?type.id:''}">
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label" >类别名称</label>
                                <div class="controls">
                                    <input required type="text" class="input-xlarge datepicker" id="name" name="name" th:value="${type!=null?type.name:''}">
                                </div>
                            </div>


                            <div class="form-actions">
                                <button type="submit" class="btn btn-primary"  >[[ ${type!=null?'更新':'新增'} ]]</button>
                            </div>
                        </fieldset>
                    </form>

                </div>
            </div>
        </div>
        <!-- content -->
    </div>
</div>
<!--  main  -->

</body>
<div th:insert="/admin/common/footer::js" ></div>

</html>